package com.hbpu.encap.homework;

public class Homework03 {
    public static void main(String[] args) {
        Worker mike = new Worker("mike", 1000, 7, 1.0);
        System.out.println(mike.inputSalary());
        Manager jack = new Manager("jack", 1200, 7, 1.2);
        System.out.println(jack.inputSalary());
    }
}

class Employee {
    private String name;
    private double salary;
    private int day;
    private double grade;

    public Employee(String name, double salary, int day, double grade) {
        this.name = name;
        this.salary = salary;
        this.day = day;
        this.grade = grade;
    }

    public double inputSalary() {
        return salary * day * grade;
    }
}

class Manager extends Employee {
    public Manager(String name, double salary, int day, double grade) {
        super(name, salary, day, grade);
    }

    @Override
    public double inputSalary() {
        return super.inputSalary() + 1000;
    }
}

class Worker extends Employee {
    public Worker(String name, double salary, int day, double grade) {
        super(name, salary, day, grade);
    }

    @Override
    public double inputSalary() {
        return super.inputSalary();
    }
}